/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.urbanski.ksp.kspmultitool.vo;

/**
 *
 * @author murbanski004
 */
public class Function implements Comparable<Function>
{
    public String name;
    public String tooltipText;
    
    public Function(String name, String... args)
    {
        this.name = name;
        
        StringBuilder tooltipBuilder = new StringBuilder(name).append('(');
        for (int i = 0; i < args.length; i++)
        {
            tooltipBuilder.append(args[i]);
            if (i < args.length - 1)
                tooltipBuilder.append(", ");
        }
        tooltipText = tooltipBuilder.append(')').toString();
    }

    @Override
    public int compareTo(Function o)
    {
        return name.compareTo(o.name);
    }
}
